package redis

import (
	"errors"
	"github.com/go-redis/redis"
)

func GetString(key string, value string) error {
	return RedisClient(func(rdb *redis.Client) error {
		result, err := rdb.Get(key).Result()
		if err != nil {
			return err
		}

		if result != value {
			return errors.New("value mismatch")
		}
		return nil
	})
}
